\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game}{
\section{pycol.engine.controller.Game.Game Class Reference}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game}\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
}


Documentation for \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game}{Game} class This class is the game definition object It is used for control the game event such as create player,take a card, give a point to a player etc .  


Inherits engine::Singleton::Singleton.\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a6654b828d4df831c9f33581efb64e972}{\_\-\_\-init\_\-\_\-}
\begin{DoxyCompactList}\small\item\em The contructor. \item\end{DoxyCompactList}\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a33fdc2eb0045d56d5914123552d1f865}{private}
\begin{DoxyCompactList}\small\item\em A generic answer for private attribute. \item\end{DoxyCompactList}\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a8fd81eac8bbc93eb8244fcad6ee3fb82}{set\_\-player\_\-list}
\begin{DoxyCompactList}\small\item\em Public setter for list\_\-player. \item\end{DoxyCompactList}\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_ac8cc3ec7c3256d6453799d253b79f71d}{get\_\-player\_\-list}
\begin{DoxyCompactList}\small\item\em Public getter for player\_\-list. \item\end{DoxyCompactList}\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a5a6c8bb9190f9ef7aab6995b8e19b3eb}{show\_\-grid}
\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a74c7c4f57d51d2898a280c3bbf7fcd9d}{run}
\begin{DoxyCompactList}\small\item\em Public Method run. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Properties}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a079d4d6ac666aa999515cd6b9eddbf2b}{player\_\-list} = property(get\_\-player\_\-list,set\_\-player\_\-list)
\begin{DoxyCompactList}\small\item\em Property for player\_\-list. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_aaba94225b1c71ed4ed0c7d601db01129}{\_\-\_\-create\_\-human\_\-player}
\begin{DoxyCompactList}\small\item\em Private method \_\-\_\-create\_\-human\_\-player. \item\end{DoxyCompactList}\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_aafc105f108f16f6382ef14730f62a5a3}{\_\-\_\-create\_\-computer\_\-player}
\begin{DoxyCompactList}\small\item\em Private method \_\-\_\-create\_\-computer\_\-player. \item\end{DoxyCompactList}\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_ae5c5ba1346756f4a09b4e2266f1f72b3}{\_\-\_\-create\_\-player}
\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_ad82b761030c7a642a3da319c9dad63d7}{\_\-\_\-where\_\-put\_\-card}
\begin{DoxyCompactList}\small\item\em Private method \_\-\_\-where\_\-put\_\-card. \item\end{DoxyCompactList}\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_ac9eb8adc5004110b283f88bbac614d5d}{\_\-\_\-check\_\-card\_\-position}
\begin{DoxyCompactList}\small\item\em Private method \_\-\_\-check\_\-card\_\-position. \item\end{DoxyCompactList}\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a3831550de07f7cf12de00d8ff79b6a38}{\_\-\_\-computing}
\item 
def \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a435f74ec9ce08baaad7422f399662757}{\_\-\_\-compute\_\-score}
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_abd39bd44e23268493475de3e49991309}{\_\-\_\-player\_\-list}
\item 
\hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a5cb406c070bacf64189435364618d58a}{\_\-\_\-talon}
\item 
\hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a19e7d9e3ef152be8a2488fc7ad139897}{\_\-\_\-grid}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Documentation for \hyperlink{classpycol_1_1engine_1_1controller_1_1Game_1_1Game}{Game} class This class is the game definition object It is used for control the game event such as create player,take a card, give a point to a player etc . .. \begin{DoxyNote}{Note}
: This class can be instanciated several times, but all game object have the same state. 
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
: \hyperlink{namespacepycol_1_1engine_1_1Singleton}{Singleton} 
\end{DoxySeeAlso}


Definition at line 58 of file Game.py.

\subsection{Member Function Documentation}
\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_ac9eb8adc5004110b283f88bbac614d5d}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!\_\-\_\-check\_\-card\_\-position@{\_\-\_\-check\_\-card\_\-position}}
\index{\_\-\_\-check\_\-card\_\-position@{\_\-\_\-check\_\-card\_\-position}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{\_\-\_\-check\_\-card\_\-position}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.\_\-\_\-check\_\-card\_\-position ( {\em self}, \/   {\em player}, \/   {\em card\_\-number}, \/   {\em x}, \/   {\em y})\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_ac9eb8adc5004110b283f88bbac614d5d}


Private method \_\-\_\-check\_\-card\_\-position. 
\begin{DoxyParams}{Parameters}
\item[{\em self}]The object pointer \item[{\em player,:}]The pointer of player object \item[{\em card\_\-number,:}]The number of card \item[{\em x,:}]x axis \item[{\em y,:}]y axis \end{DoxyParams}
\begin{DoxyReturn}{Returns}
: bad\_\-position a boolean True or False 
\end{DoxyReturn}


Definition at line 194 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a435f74ec9ce08baaad7422f399662757}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!\_\-\_\-compute\_\-score@{\_\-\_\-compute\_\-score}}
\index{\_\-\_\-compute\_\-score@{\_\-\_\-compute\_\-score}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{\_\-\_\-compute\_\-score}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.\_\-\_\-compute\_\-score ( {\em self}, \/   {\em player}, \/   {\em x}, \/   {\em y})\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a435f74ec9ce08baaad7422f399662757}


Definition at line 342 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a3831550de07f7cf12de00d8ff79b6a38}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!\_\-\_\-computing@{\_\-\_\-computing}}
\index{\_\-\_\-computing@{\_\-\_\-computing}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{\_\-\_\-computing}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.\_\-\_\-computing ( {\em self}, \/   {\em x}, \/   {\em y})\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a3831550de07f7cf12de00d8ff79b6a38}


Definition at line 298 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_aafc105f108f16f6382ef14730f62a5a3}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!\_\-\_\-create\_\-computer\_\-player@{\_\-\_\-create\_\-computer\_\-player}}
\index{\_\-\_\-create\_\-computer\_\-player@{\_\-\_\-create\_\-computer\_\-player}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{\_\-\_\-create\_\-computer\_\-player}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.\_\-\_\-create\_\-computer\_\-player ( {\em self}, \/   {\em number\_\-computer\_\-player})\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_aafc105f108f16f6382ef14730f62a5a3}


Private method \_\-\_\-create\_\-computer\_\-player. : It is a private method used for create a number of computer object 
\begin{DoxyParams}{Parameters}
\item[{\em self}]The object pointer \item[{\em number\_\-computer\_\-player}]The number of computer player for this round \end{DoxyParams}


Definition at line 119 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_aaba94225b1c71ed4ed0c7d601db01129}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!\_\-\_\-create\_\-human\_\-player@{\_\-\_\-create\_\-human\_\-player}}
\index{\_\-\_\-create\_\-human\_\-player@{\_\-\_\-create\_\-human\_\-player}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{\_\-\_\-create\_\-human\_\-player}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.\_\-\_\-create\_\-human\_\-player ( {\em self}, \/   {\em number\_\-human\_\-player})\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_aaba94225b1c71ed4ed0c7d601db01129}


Private method \_\-\_\-create\_\-human\_\-player. : It is a private method used for create a number of player object 
\begin{DoxyParams}{Parameters}
\item[{\em self}]The object pointer \item[{\em number\_\-human\_\-player}]The number of human player for this round \end{DoxyParams}


Definition at line 92 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_ae5c5ba1346756f4a09b4e2266f1f72b3}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!\_\-\_\-create\_\-player@{\_\-\_\-create\_\-player}}
\index{\_\-\_\-create\_\-player@{\_\-\_\-create\_\-player}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{\_\-\_\-create\_\-player}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.\_\-\_\-create\_\-player ( {\em self}, \/   {\em number\_\-human\_\-player}, \/   {\em number\_\-computer\_\-player})\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_ae5c5ba1346756f4a09b4e2266f1f72b3}


Definition at line 137 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a6654b828d4df831c9f33581efb64e972}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!\_\-\_\-init\_\-\_\-@{\_\-\_\-init\_\-\_\-}}
\index{\_\-\_\-init\_\-\_\-@{\_\-\_\-init\_\-\_\-}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{\_\-\_\-init\_\-\_\-}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.\_\-\_\-init\_\-\_\- ( {\em self})}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a6654b828d4df831c9f33581efb64e972}


The contructor. 
\begin{DoxyParams}{Parameters}
\item[{\em self,:}]The pointer object \end{DoxyParams}


Definition at line 61 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_ad82b761030c7a642a3da319c9dad63d7}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!\_\-\_\-where\_\-put\_\-card@{\_\-\_\-where\_\-put\_\-card}}
\index{\_\-\_\-where\_\-put\_\-card@{\_\-\_\-where\_\-put\_\-card}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{\_\-\_\-where\_\-put\_\-card}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.\_\-\_\-where\_\-put\_\-card ( {\em self})\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_ad82b761030c7a642a3da319c9dad63d7}


Private method \_\-\_\-where\_\-put\_\-card. 
\begin{DoxyParams}{Parameters}
\item[{\em self}]The object pointer \end{DoxyParams}
\begin{DoxyReturn}{Returns}
x,y coordinate position in grid 
\end{DoxyReturn}


Definition at line 146 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_ac8cc3ec7c3256d6453799d253b79f71d}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!get\_\-player\_\-list@{get\_\-player\_\-list}}
\index{get\_\-player\_\-list@{get\_\-player\_\-list}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{get\_\-player\_\-list}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.get\_\-player\_\-list ( {\em self})}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_ac8cc3ec7c3256d6453799d253b79f71d}


Public getter for player\_\-list. 
\begin{DoxyParams}{Parameters}
\item[{\em self}]The object pointer \end{DoxyParams}


Definition at line 81 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a33fdc2eb0045d56d5914123552d1f865}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!private@{private}}
\index{private@{private}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{private}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.private ( {\em self})}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a33fdc2eb0045d56d5914123552d1f865}


A generic answer for private attribute. 
\begin{DoxyParams}{Parameters}
\item[{\em self}]The object pointer \end{DoxyParams}


Definition at line 70 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a74c7c4f57d51d2898a280c3bbf7fcd9d}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!run@{run}}
\index{run@{run}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{run}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.run ( {\em self}, \/   {\em number\_\-human\_\-player}, \/   {\em number\_\-computer\_\-player})}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a74c7c4f57d51d2898a280c3bbf7fcd9d}


Public Method run. : It is the game \hyperlink{namespacepycol_1_1engine_1_1controller}{controller} event 
\begin{DoxyParams}{Parameters}
\item[{\em self}]The object pointer \item[{\em number\_\-human\_\-player,:}]The number of human player \item[{\em number\_\-computer\_\-player,:}]The number of computer player \end{DoxyParams}


Definition at line 358 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a8fd81eac8bbc93eb8244fcad6ee3fb82}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!set\_\-player\_\-list@{set\_\-player\_\-list}}
\index{set\_\-player\_\-list@{set\_\-player\_\-list}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{set\_\-player\_\-list}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.set\_\-player\_\-list ( {\em self}, \/   {\em value})}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a8fd81eac8bbc93eb8244fcad6ee3fb82}


Public setter for list\_\-player. 
\begin{DoxyParams}{Parameters}
\item[{\em self}]The object pointer \item[{\em value}]The newest value \end{DoxyParams}


Definition at line 76 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a5a6c8bb9190f9ef7aab6995b8e19b3eb}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!show\_\-grid@{show\_\-grid}}
\index{show\_\-grid@{show\_\-grid}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{show\_\-grid}]{\setlength{\rightskip}{0pt plus 5cm}def pycol.engine.controller.Game.Game.show\_\-grid ( {\em self})}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a5a6c8bb9190f9ef7aab6995b8e19b3eb}


Definition at line 282 of file Game.py.

\subsection{Member Data Documentation}
\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a19e7d9e3ef152be8a2488fc7ad139897}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!\_\-\_\-grid@{\_\-\_\-grid}}
\index{\_\-\_\-grid@{\_\-\_\-grid}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{\_\-\_\-grid}]{\setlength{\rightskip}{0pt plus 5cm}{\bf pycol.engine.controller.Game.Game.\_\-\_\-grid}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a19e7d9e3ef152be8a2488fc7ad139897}


Definition at line 64 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_abd39bd44e23268493475de3e49991309}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!\_\-\_\-player\_\-list@{\_\-\_\-player\_\-list}}
\index{\_\-\_\-player\_\-list@{\_\-\_\-player\_\-list}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{\_\-\_\-player\_\-list}]{\setlength{\rightskip}{0pt plus 5cm}{\bf pycol.engine.controller.Game.Game.\_\-\_\-player\_\-list}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_abd39bd44e23268493475de3e49991309}


Definition at line 62 of file Game.py.\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a5cb406c070bacf64189435364618d58a}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!\_\-\_\-talon@{\_\-\_\-talon}}
\index{\_\-\_\-talon@{\_\-\_\-talon}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{\_\-\_\-talon}]{\setlength{\rightskip}{0pt plus 5cm}{\bf pycol.engine.controller.Game.Game.\_\-\_\-talon}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a5cb406c070bacf64189435364618d58a}


Definition at line 63 of file Game.py.

\subsection{Property Documentation}
\hypertarget{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a079d4d6ac666aa999515cd6b9eddbf2b}{
\index{pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}!player\_\-list@{player\_\-list}}
\index{player\_\-list@{player\_\-list}!pycol::engine::controller::Game::Game@{pycol::engine::controller::Game::Game}}
\subsubsection[{player\_\-list}]{\setlength{\rightskip}{0pt plus 5cm}pycol.engine.controller.Game.Game.player\_\-list = property(get\_\-player\_\-list,set\_\-player\_\-list)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classpycol_1_1engine_1_1controller_1_1Game_1_1Game_a079d4d6ac666aa999515cd6b9eddbf2b}


Property for player\_\-list. 
\begin{DoxyParams}{Parameters}
\item[{\em self}]The object pointer \end{DoxyParams}


Definition at line 86 of file Game.py.

The documentation for this class was generated from the following file:\begin{DoxyCompactItemize}
\item 
/home/jonathan/Projets/Python/pycol/engine/controller/\hyperlink{Game_8py}{Game.py}\end{DoxyCompactItemize}
